﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/head.jspf"%>   
<title>东方易云后台管理系统</title>
<style>
body { background: #f5f5f5 ;}
</style>
<script>
function addFlowActorsTemplateSave(){
	var errorMsg = "";
	errorMsg += sl_check($("#actorName")[0], "节点名称", 255, 1);
	errorMsg += sl_check($("#actorAlias")[0], "节点别名", 255, 0);
	errorMsg += sl_check($("#notes")[0], "节点备注", 255, 0);
	errorMsg += sl_checkOption($("#actorType")[0], "节点类型");
	errorMsg += sl_checkOption($("#businessRole")[0], "商业角色");
	
	if(errorMsg != ""){
		alert(errorMsg);
	}else{
		$('#addForm').attr("action","addFlowActorsTemplateSave");
		$('#addForm').submit();
	}
	
}
function reset(){
	$('#actorName').val("");
	$('#actorAlias').val("");
	$('#actorEnd').val("");
	$('#notes').val("");
	$('#businessRole').val("");
	$('#actorType').val("");
}

function goBack(){
	var url = window.location.href;
	var pattern = new RegExp("/addFlowActorsTemplate");
	pattern.exec(url);
	window.location.href = RegExp.leftContext+"/goBackToActorsTemplate";
}
	
</script>
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="js/pngfix.js"></script>
<![endif]-->
</head>
<body>
<form method="post" action="addFlowActorsTemplateSave" id="addForm">
<input type="hidden" name="pageNo" value="<c:out value="${pageNo}" />"/>
<input type="hidden" name="flowTemplateId" id="flowTemplateId" value="<c:out value="${flowTemplateId}" />"/>
<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <div id="main-content">
    <!-- Main Content Section with everything -->
    <!-- Page Head -->
    <div id="page-title">
      <h3>企业业务流程<c:choose><c:when  test="${isEdit==null}">新建</c:when><c:otherwise>编辑</c:otherwise></c:choose>：新建节点</h3>
    </div>
    <div class="pgline"></div>
   
    <div class="clear"></div>
    

    <div id="page-title">
      <h4>节点信息</h4>
    </div>
    <div class="pgline"></div>
     <div class="bulk-actions align-left">
     <a class="button2" href="javascript:void(0);" onclick="addFlowActorsTemplateSave();">保存</a> 
     <a class="button2" href="javascript:void(0);" onclick="goBack();">返回</a> 
     <a class="button2" href="javascript:void(0);" onclick="reset();">重置</a> </div>
    <div class="clear"></div>

    <div class="bulk-actions align-left"> </div>
    <div class="clear"></div>
    <div class="notification querytj png_bg">
      <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="13%" height="35" align="right">&nbsp;&nbsp;节点编号： </td>
            <td width="29%"><input type="text" name="actorNo" id="actorNo" class="input21"  readonly="readonly" value="<c:out value="${actorNo}"/>"/></td>
            <td width="15%" align="right">节点名称： </td>
            <td width="26%"><input name="actorName" id="actorName" type="text"  class="input2" value="<c:out value="${actorName}"/>"/></td>
          </tr>
          <tr>
            <td height="35" align="right">&nbsp;&nbsp;节点类型： </td>
            <td height="35"><select name="actorType" id="actorType" class="select1" >
            	<option value="">-</option>
	            <c:forEach items="${optionActorTypeMap}" var="one">
	              <option value="${one.key}" <c:out value="${actorType== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
	            </c:forEach>
              </select></td>
            <td width="15%" align="right">节点别名： </td>
            <td width="26%"><input name="actorAlias" id="actorAlias" type="text"  class="input2" value="<c:out value="${actorAlias}"/>" /></td>
          </tr>
          <tr>
            <td height="35" align="right">商业角色：</td>
            <td height="35"><select name="businessRole" id="businessRole" class="select1" >
            	<option value="">-</option>
	            <c:forEach items="${optionBusinessRoleMap}" var="one">
	              <option value="${one.key}" <c:out value="${businessRole== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
	            </c:forEach>
              </select></td>
            <td height="35" align="right">&nbsp;</td>
            <td height="35">&nbsp;</td>
          </tr>
          <tr>
            <td height="35" align="right">节点备注： </td>
            <td height="35" colspan="3"><textarea name="notes" rows="3" id="notes" class="input3" style="width:600px" ><c:out value="${notes}"/></textarea></td>
          </tr>
        </table>
      </div>
    </div>

  <!-- End #main-content -->
</div>

</form>
</body>
</html>
